package com.gm.census.service.impl;

import java.util.logging.Logger;

import com.gm.census.service.UserInfoFacade;
import com.google.appengine.api.NamespaceManager;
import com.google.appengine.api.users.UserService;

public class GoogleFacade implements UserInfoFacade {

	private static final Logger log = Logger.getLogger(GoogleFacade.class
			.getName());
	private UserService googleService;

	@Override
	public String getLoggedUserId() {
		return googleService.getCurrentUser().getEmail();
	}

	public UserService getGoogleService() {
		return googleService;
	}

	public void setGoogleService(UserService googleService) {
		this.googleService = googleService;
	}

	@Override
	public String getUserNamespace() {
		return NamespaceManager.getGoogleAppsNamespace();
	}

}
